const express = require('express')
const cors = require('cors')
const morgan = require('morgan')

const router = require('./router')

const app = express()

app.use(cors())

app.use(morgan('dev'))

app.use('/public', express.static('public'))
app.use('/temp', express.static('temp'))
app.use('/uploads', express.static('uploads'))

router(app)

app.listen(3003, () => {
  console.log('服务启动： http://localhost:3003');
})
